﻿using System.Collections.Generic;

using System;

namespace FrameOperateSync
{
    static class RenderData
    {
        private static IFrameParser Parser;

        public static void SetParser(IFrameParser parser)
        {
            Parser = parser;
        }

        public static byte[] ToBytes(IRenderData data)
        {
            return Parser.ToBytes(data);
        }
        public static IRenderData FromBytes(byte[] data,Type type)
        {
            return Parser.FromBytes(data, type);
        }


        public static void RecvRenderData(FrameOperateData data)
        {
            renderRecvQueue.Enqueue(data);
        }

        internal static Queue<FrameOperateData> renderRecvQueue = new Queue<FrameOperateData>(30);
    }
}
